Integrand size = 41, antiderivative size = 103 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 a (A-B-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 a (3 A+3 B+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]
2*a*(A-B-C)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin( 1/2*d*x+1/2*c),2^(1/2))/d+2/3*a*(3*A+3*B+C)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/c os(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/3*a*C*sin(d*x+ c)/d/cos(d*x+c)^(3/2)+2*a*(B+C)*sin(d*x+c)/d/cos(d*x+c)^(1/2)
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 8.15 (sec) , antiderivative size = 1180, normalized size of antiderivative = 11.46 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx =\text {Too large to display} \]
a*(Sqrt[Cos[c + d*x]]*(1 + Cos[c + d*x])*Sec[c/2 + (d*x)/2]^2*(-1/2*((A - 2*B - 2*C + A*Cos[2*c])*Csc[c]*Sec[c])/d + (C*Sec[c]*Sec[c + d*x]^2*Sin[d* x])/(3*d) + (Sec[c]*Sec[c + d*x]*(C*Sin[c] + 3*B*Sin[d*x] + 3*C*Sin[d*x])) /(3*d)) - (A*(1 + Cos[c + d*x])*Csc[c]*HypergeometricPFQ[{1/4, 1/2}, {5/4} , Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[c/2 + (d*x)/2]^2*Sec[d*x - ArcTan[Cot[c ]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[-(Sqrt[1 + Cot[c]^2]*Sin[c]*S in[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin[d*x - ArcTan[Cot[c]]]])/(d*Sqrt[1 + Cot[c]^2]) - (B*(1 + Cos[c + d*x])*Csc[c]*HypergeometricPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[c/2 + (d*x)/2]^2*Sec[d*x - ArcTan[ Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[-(Sqrt[1 + Cot[c]^2]*Sin [c]*Sin[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin[d*x - ArcTan[Cot[c]]]])/(d*Sq rt[1 + Cot[c]^2]) - (C*(1 + Cos[c + d*x])*Csc[c]*HypergeometricPFQ[{1/4, 1 /2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[c/2 + (d*x)/2]^2*Sec[d*x - Ar cTan[Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[-(Sqrt[1 + Cot[c]^2 ]*Sin[c]*Sin[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin[d*x - ArcTan[Cot[c]]]])/ (3*d*Sqrt[1 + Cot[c]^2]) - (A*(1 + Cos[c + d*x])*Csc[c]*Sec[c/2 + (d*x)/2] ^2*((HypergeometricPFQ[{-1/2, -1/4}, {3/4}, Cos[d*x + ArcTan[Tan[c]]]^2]*S in[d*x + ArcTan[Tan[c]]]*Tan[c])/(Sqrt[1 - Cos[d*x + ArcTan[Tan[c]]]]*Sqrt [1 + Cos[d*x + ArcTan[Tan[c]]]]*Sqrt[Cos[c]*Cos[d*x + ArcTan[Tan[c]]]*Sqrt [1 + Tan[c]^2]]*Sqrt[1 + Tan[c]^2]) - ((Sin[d*x + ArcTan[Tan[c]]]*Tan[c...
Time = 0.73 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.03, number of steps used = 13, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.317, Rules used = {3042, 4600, 3042, 3510, 27, 3042, 3500, 27, 3042, 3227, 3042, 3119, 3120}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {\cos (c+d x)} (a \sec (c+d x)+a) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\cos (c+d x)} (a \sec (c+d x)+a) \left (A+B \sec (c+d x)+C \sec (c+d x)^2\right )dx\) |
\(\Big \downarrow \) 4600 |
\(\displaystyle \int \frac {(a \cos (c+d x)+a) \left (A \cos ^2(c+d x)+B \cos (c+d x)+C\right )}{\cos ^{\frac {5}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (A \sin \left (c+d x+\frac {\pi }{2}\right )^2+B \sin \left (c+d x+\frac {\pi }{2}\right )+C\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^{5/2}}dx\) |
\(\Big \downarrow \) 3510 |
\(\displaystyle \frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {2}{3} \int -\frac {3 a A \cos ^2(c+d x)+a (3 A+3 B+C) \cos (c+d x)+3 a (B+C)}{2 \cos ^{\frac {3}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} \int \frac {3 a A \cos ^2(c+d x)+a (3 A+3 B+C) \cos (c+d x)+3 a (B+C)}{\cos ^{\frac {3}{2}}(c+d x)}dx+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int \frac {3 a A \sin \left (c+d x+\frac {\pi }{2}\right )^2+a (3 A+3 B+C) \sin \left (c+d x+\frac {\pi }{2}\right )+3 a (B+C)}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3500 |
\(\displaystyle \frac {1}{3} \left (2 \int \frac {a (3 A+3 B+C)+3 a (A-B-C) \cos (c+d x)}{2 \sqrt {\cos (c+d x)}}dx+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} \left (\int \frac {a (3 A+3 B+C)+3 a (A-B-C) \cos (c+d x)}{\sqrt {\cos (c+d x)}}dx+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\int \frac {a (3 A+3 B+C)+3 a (A-B-C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{3} \left (a (3 A+3 B+C) \int \frac {1}{\sqrt {\cos (c+d x)}}dx+3 a (A-B-C) \int \sqrt {\cos (c+d x)}dx+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (a (3 A+3 B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+3 a (A-B-C) \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {1}{3} \left (a (3 A+3 B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {6 a (A-B-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {1}{3} \left (\frac {2 a (3 A+3 B+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}+\frac {6 a (A-B-C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {6 a (B+C) \sin (c+d x)}{d \sqrt {\cos (c+d x)}}\right )+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\) |
(2*a*C*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + ((6*a*(A - B - C)*Elliptic E[(c + d*x)/2, 2])/d + (2*a*(3*A + 3*B + C)*EllipticF[(c + d*x)/2, 2])/d + (6*a*(B + C)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]))/3
3.12.91.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* (a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A *b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)*Cos[ e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - S imp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*( m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1)) ))*Sin[e + f*x] - b*C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; F reeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x _)])^(m_.)*((A_.) + (B_.)*sec[(e_.) + (f_.)*(x_)] + (C_.)*sec[(e_.) + (f_.) *(x_)]^2), x_Symbol] :> Simp[d^(m + 2) Int[(b + a*Cos[e + f*x])^m*(d*Cos[ e + f*x])^(n - m - 2)*(C + B*Cos[e + f*x] + A*Cos[e + f*x]^2), x], x] /; Fr eeQ[{a, b, d, e, f, A, B, C, n}, x] && !IntegerQ[n] && IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(487\) vs. \(2(147)=294\).
Time = 2.10 (sec) , antiderivative size = 488, normalized size of antiderivative = 4.74
method | result | size |
default | \(-\frac {4 \sqrt {-\left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, a \left (\frac {B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{2 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}+\frac {A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \left (\operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-\operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{2 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}+\frac {C \left (-\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}{6 \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {1}{2}\right )^{2}}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{3 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}\right )}{2}+\frac {\left (\frac {B}{2}+\frac {C}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(488\) |
int((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)*cos(d*x+c)^(1/2),x,me thod=_RETURNVERBOSE)
-4*(-(-2*cos(1/2*d*x+1/2*c)^2+1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*a*(1/2*B*(sin (1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)^2+1)^(1/2)/(-2*sin(1/2*d*x +1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2) )+1/2*A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)^2+1)^(1/2)/(-2 *sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(EllipticF(cos(1/2*d*x+1 /2*c),2^(1/2))-EllipticE(cos(1/2*d*x+1/2*c),2^(1/2)))+1/2*C*(-1/6*cos(1/2* d*x+1/2*c)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/(cos(1/2*d *x+1/2*c)^2-1/2)^2+1/3*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c) ^2+1)^(1/2)/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF (cos(1/2*d*x+1/2*c),2^(1/2)))+(1/2*B+1/2*C)/sin(1/2*d*x+1/2*c)^2/(2*sin(1/ 2*d*x+1/2*c)^2-1)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(2* sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)-EllipticE(cos(1/2*d*x+1/2*c),2^(1/ 2))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)))/sin(1/ 2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 212, normalized size of antiderivative = 2.06 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {-i \, \sqrt {2} {\left (3 \, A + 3 \, B + C\right )} a \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} {\left (3 \, A + 3 \, B + C\right )} a \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 i \, \sqrt {2} {\left (A - B - C\right )} a \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 i \, \sqrt {2} {\left (A - B - C\right )} a \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, {\left (B + C\right )} a \cos \left (d x + c\right ) + C a\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{2}} \]
integrate((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)*cos(d*x+c)^(1/2 ),x, algorithm="fricas")
1/3*(-I*sqrt(2)*(3*A + 3*B + C)*a*cos(d*x + c)^2*weierstrassPInverse(-4, 0 , cos(d*x + c) + I*sin(d*x + c)) + I*sqrt(2)*(3*A + 3*B + C)*a*cos(d*x + c )^2*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) + 3*I*sqrt(2 )*(A - B - C)*a*cos(d*x + c)^2*weierstrassZeta(-4, 0, weierstrassPInverse( -4, 0, cos(d*x + c) + I*sin(d*x + c))) - 3*I*sqrt(2)*(A - B - C)*a*cos(d*x + c)^2*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I *sin(d*x + c))) + 2*(3*(B + C)*a*cos(d*x + c) + C*a)*sqrt(cos(d*x + c))*si n(d*x + c))/(d*cos(d*x + c)^2)
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a \left (\int A \sqrt {\cos {\left (c + d x \right )}}\, dx + \int A \sqrt {\cos {\left (c + d x \right )}} \sec {\left (c + d x \right )}\, dx + \int B \sqrt {\cos {\left (c + d x \right )}} \sec {\left (c + d x \right )}\, dx + \int B \sqrt {\cos {\left (c + d x \right )}} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \sqrt {\cos {\left (c + d x \right )}} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \sqrt {\cos {\left (c + d x \right )}} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \]
a*(Integral(A*sqrt(cos(c + d*x)), x) + Integral(A*sqrt(cos(c + d*x))*sec(c + d*x), x) + Integral(B*sqrt(cos(c + d*x))*sec(c + d*x), x) + Integral(B* sqrt(cos(c + d*x))*sec(c + d*x)**2, x) + Integral(C*sqrt(cos(c + d*x))*sec (c + d*x)**2, x) + Integral(C*sqrt(cos(c + d*x))*sec(c + d*x)**3, x))
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )} \sqrt {\cos \left (d x + c\right )} \,d x } \]
integrate((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)*cos(d*x+c)^(1/2 ),x, algorithm="maxima")
integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)*(a*sec(d*x + c) + a)*sqr t(cos(d*x + c)), x)
\[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )} \sqrt {\cos \left (d x + c\right )} \,d x } \]
integrate((a+a*sec(d*x+c))*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)*cos(d*x+c)^(1/2 ),x, algorithm="giac")
integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)*(a*sec(d*x + c) + a)*sqr t(cos(d*x + c)), x)
Time = 19.67 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.79 \[ \int \sqrt {\cos (c+d x)} (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,A\,a\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,A\,a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,B\,a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,B\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
(2*A*a*ellipticE(c/2 + (d*x)/2, 2))/d + (2*A*a*ellipticF(c/2 + (d*x)/2, 2) )/d + (2*B*a*ellipticF(c/2 + (d*x)/2, 2))/d + (2*B*a*sin(c + d*x)*hypergeo m([-1/4, 1/2], 3/4, cos(c + d*x)^2))/(d*cos(c + d*x)^(1/2)*(sin(c + d*x)^2 )^(1/2)) + (2*C*a*sin(c + d*x)*hypergeom([-1/4, 1/2], 3/4, cos(c + d*x)^2) )/(d*cos(c + d*x)^(1/2)*(sin(c + d*x)^2)^(1/2)) + (2*C*a*sin(c + d*x)*hype rgeom([-3/4, 1/2], 1/4, cos(c + d*x)^2))/(3*d*cos(c + d*x)^(3/2)*(sin(c + d*x)^2)^(1/2))